package com.kobe.task.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.kobe.common.annotation.Excel;
import com.kobe.common.core.domain.BaseEntity;
import org.springframework.beans.factory.annotation.Value;

import javax.validation.constraints.NotNull;

/**
 * 任务管理对象 sys_oa_task
 *
 * @author ruoyi
 * @date 2025-10-18
 */
public class SysOaTask extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */

    private Long taskId;

    /** 项目ID */
    @NotNull
    private Long projectId;

    /** 任务主题 */
    @Excel(name = "任务主题")
    @NotNull(message = "任务主题不能为空")
    private String taskTitle;

    /** 工作类型(1接待，2沟通 3方案策划等) */
    @Excel(name = "工作类型")
    @NotNull(message = "工作类型不能为空")
    private String taskType;

    /** 优先级（0一般 1中 2高） */
    @Excel(name = "优先级", readConverterExp = "0=一般,1=中,2=高")
    @NotNull(message = "优先级不能为空")
    private String taskGrade;

    /** 协作人员 */
    @Excel(name = "协作人员")
    private String collaborator;

    /** 开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    @NotNull(message = "开始时间不能为空")
    private Date beginTime;

    /** 结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date finishTime;

    /** 详细描述 */
    private String content;

    /** 附件 */
    private String accessory;

    public void setTaskId(Long taskId)
    {
        this.taskId = taskId;
    }

    public Long getTaskId()
    {
        return taskId;
    }

    public void setProjectId(Long projectId)
    {
        this.projectId = projectId;
    }

    public Long getProjectId()
    {
        return projectId;
    }

    public void setTaskTitle(String taskTitle)
    {
        this.taskTitle = taskTitle;
    }

    public String getTaskTitle()
    {
        return taskTitle;
    }

    public void setTaskType(String taskType)
    {
        this.taskType = taskType;
    }

    public String getTaskType()
    {
        return taskType;
    }

    public void setTaskGrade(String taskGrade)
    {
        this.taskGrade = taskGrade;
    }

    public String getTaskGrade()
    {
        return taskGrade;
    }

    public void setCollaborator(String collaborator)
    {
        this.collaborator = collaborator;
    }

    public String getCollaborator()
    {
        return collaborator;
    }

    public void setBeginTime(Date beginTime)
    {
        this.beginTime = beginTime;
    }

    public Date getBeginTime()
    {
        return beginTime;
    }

    public void setFinishTime(Date finishTime)
    {
        this.finishTime = finishTime;
    }

    public Date getFinishTime()
    {
        return finishTime;
    }

    public void setContent(String content)
    {
        this.content = content;
    }

    public String getContent()
    {
        return content;
    }

    public void setAccessory(String accessory)
    {
        this.accessory = accessory;
    }

    public String getAccessory()
    {
        return accessory;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("taskId", getTaskId())
                .append("projectId", getProjectId())
                .append("taskTitle", getTaskTitle())
                .append("taskType", getTaskType())
                .append("taskGrade", getTaskGrade())
                .append("collaborator", getCollaborator())
                .append("beginTime", getBeginTime())
                .append("finishTime", getFinishTime())
                .append("content", getContent())
                .append("accessory", getAccessory())
                .append("remark", getRemark())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}

